import {getExamApi} from '../../api/examModule'

export default {
  namespaced: true,
  state: {
    examlist:[],
    currentPage:0,
    total:0
  },
  mutations: {
    SET_EXAM(state,examlist){
      state.examlist=examlist
      // console.log(state.examlist)
    },
    SET_CURRENT(state,current){
      state.currentPage=current
    },
    // SET_TOTAL(state,total){
    //   state.total=total
    // }
  },
  actions: {
    async getExam({commit}){
      let r=await getExamApi()
      console.log(r.data.data)
      commit('SET_EXAM',r.data.data)
      // commit('SET_TOTAL',r.total)
      // console.log(JSON.parse(r.data).length)
    }
  },
  getters: {}
}